@extends('common.com')
@section('content')

<a class="btn btn-primary" href="{{'admin/create'}}">添加文章</a>
@foreach ($data as $v)
 <div class="panel panel-default">
  <div class="panel-body">
  
  
    {{$v->title}}
    <a href="{{url("/admin/{$v->id}")}}" class="btn btn-info">阅读</a>
    <a href="{{url("/admin/{$v->id}/edit")}}" class="btn btn-info">修改</a>

      <form action="{{url("/admin/{$v->id}")}}" method="post" style="display: inline-block;">
            {{csrf_field()}}
            <input type="hidden" name="_method" value="DELETE">
            <button type="submit" class="btn btn-danger">删除</button>
        </form>
    </div>
    </div>
   @endforeach
   
     
  <ul class="pagination">
  
  {!!$data->render()!!}
  </ul>
  
  
  @endsection